package taskcards;

import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.*;
public class Filter extends FileFilter{

	@Override
	public boolean accept(File f){        
        if (f.isDirectory()) {
            return true;
        }
        String filename = f.getName();
        if(filename.endsWith(".gif") 
        		|| filename.endsWith(".jpeg") 
        		|| filename.endsWith(".jpg") 
        		|| filename.endsWith(".png") 
        		|| filename.endsWith(".tif") ){ return true;}
        else{
        	return false;
        }
        
      
 
    }
 

	@Override
	public String getDescription() {
		// TODO Auto-generated method stub
		 return "Images Only";
	}

}